package lambda06;

import org.junit.Test;

import java.util.function.Predicate;

/**Predicate接口
 * @FunctionalInterface
 * public interface Predicate<T> {
 *
 *    boolean test(T t);
 *  }
 *
 */
public class PredicateDemo {
	@Test
	public void test01() {
		Predicate<String> p = str -> str.length() > 5;
		System.out.println(p.test("abc"));
		System.out.println(p.test("abcdef"));
	}
}
